import e from 'cesium/Source/Widgets/CesiumWidget/CesiumWidget.js';
import 'cesium/Source/Widgets/widgets.css';
import r from 'cesium/Source/Core/GroundPolylineGeometry.js';
import o from 'cesium/Source/Core/GeometryInstance.js';
import i from 'cesium/Source/Core/Cartesian3.js';
import t from 'cesium/Source/Core/Color.js';
import s from 'cesium/Source/Scene/GroundPolylinePrimitive.js';
import m from 'cesium/Source/Scene/PolylineMaterialAppearance.js';
import n from 'cesium/Source/Scene/Material.js';
window.CESIUM_BASE_URL = '';
const c = (r, o) => {
  if (!r) throw new Error('初始化地图传入element参数错误,传入参数为div的id');
  if (!o) throw new Error('初始化地图传入options配置参数错误,传入参数Object');
  return new e(r, o);
};
const u = (e, c) => {
  const u = new r({ positions: i.fromDegreesArray(c.lonlat), width: c.width || 4 });
  const a = new s({
    geometryInstances: new o({ geometry: u }),
    appearance: new m({ material: new n({ fabric: { type: 'Color', uniforms: { color: t.RED } } }) }),
    asynchronous: !0,
  });
  return e.scene.primitives.add(a);
};
export { u as createGraphic, c as initMap };
